<?php

namespace Application\Model\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Comment
 *
 * @ORM\Table(name="comment", indexes={@ORM\Index(name="fk_Comments_Projecs1_idx", columns={"Projects_Id"}), @ORM\Index(name="fk_Comments_User1_idx", columns={"Users_Id"})})
 * @ORM\Entity
 */
class Comment
{
    /**
     * @var integer
     *
     * @ORM\Column(name="Id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="Text", type="string", length=45, nullable=true)
     */
    private $text;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="Date", type="datetime", nullable=true)
     */
    private $date;

    /**
     * @var \Application\Model\Entity\Project
     *
     * @ORM\ManyToOne(targetEntity="Application\Model\Entity\Project")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="Projects_Id", referencedColumnName="Id")
     * })
     */
    private $projects;

    /**
     * @var \Application\Model\Entity\User
     *
     * @ORM\ManyToOne(targetEntity="Application\Model\Entity\User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="Users_Id", referencedColumnName="Id")
     * })
     */
    private $users;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set text
     *
     * @param string $text
     * @return Comment
     */
    public function setText($text)
    {
        $this->text = $text;

        return $this;
    }

    /**
     * Get text
     *
     * @return string 
     */
    public function getText()
    {
        return $this->text;
    }

    /**
     * Set date
     *
     * @param \DateTime $date
     * @return Comment
     */
    public function setDate($date)
    {
        $this->date = $date;

        return $this;
    }

    /**
     * Get date
     *
     * @return \DateTime 
     */
    public function getDate()
    {
        return $this->date;
    }

    /**
     * Set projects
     *
     * @param \Application\Model\Entity\Project $projects
     * @return Comment
     */
    public function setProjects(\Application\Model\Entity\Project $projects = null)
    {
        $this->projects = $projects;

        return $this;
    }

    /**
     * Get projects
     *
     * @return \Application\Model\Entity\Project 
     */
    public function getProjects()
    {
        return $this->projects;
    }

    /**
     * Set users
     *
     * @param \Application\Model\Entity\User $users
     * @return Comment
     */
    public function setUsers(\Application\Model\Entity\User $users = null)
    {
        $this->users = $users;

        return $this;
    }

    /**
     * Get users
     *
     * @return \Application\Model\Entity\User 
     */
    public function getUsers()
    {
        return $this->users;
    }
}
